package com.logos;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Date;

public class LoggerTest01 {

    public static final Logger LOGGER = LoggerFactory.getLogger("LoggerTest01.class");

    public static void main(String[] args) {
        // 记录用户的操作日志
        // 登录操作
        String userName = "logos";
        String passWord = "123456";
        if ("logos".equals(userName) && "123456".equals(passWord)) {
            System.out.println("登录成功");
            LOGGER.info("登录成功:{}",new Date());
        } else {
            System.out.println("登录失败");
            LOGGER.info("登录失败:{}",new Date());
        }
    }
}
